package cn.schina.dbfw.dao;

import java.sql.SQLException;

import cn.schina.dbfw.config.Configures;


public class DaoConn {
	static JDBCConnection dbConn = null;
	public static JDBCConnection createDBConnection() throws SQLException
	{
		if(dbConn==null)
		{
			String driver = Configures.getString("dbfw.dao.driver"); //$NON-NLS-1$
			String url    = Configures.getString("dbfw.dao.dbconn_url"); //$NON-NLS-1$
			String user   = Configures.getString("dbfw.dao.dbconn_username"); //$NON-NLS-1$
			String pwd    = Configures.getString("dbfw.dao.dbconn_password"); //$NON-NLS-1$
			dbConn = new JDBCConnection(1,driver,url,user,pwd);
		}
		return dbConn;
	}
}
